1. Field of the Invention
The present invention relates to scaling digital pictures, and more particularly, to scaling digital pictures with reduced memory usage.
2. Description of the Prior Art
In practice, scaling digital pictures is usually performed for still images or video frames to fit a specific application. The conventional method to scale a picture is to scale its horizontal dimension (width) first and then its vertical dimension (height), or vice versa. This requires a large buffer memory to store the results of scaling the horizontal dimension.
Please refer to FIG. 1 and FIG. 2. FIG. 1 is a schematic diagram of an up-scaling process according to the prior art, and FIG. 2 is a schematic diagram of a down-scaling process according to the prior art. Wold and Hold are the old width and height; Wnew and Hnew are the new width and new height; SRC is a memory for storing a source picture; DST is a memory for storing a scaled picture; and BUFFER is a memory for temporarily storing data during the scaling process. The method for performing a scaling process is to use the sampling formula at a new sampling point as Eq. 1.
                              x          ⁡                      (            t            )                          =                              ∑                          n              =                              -                1                                      1                    ⁢                                          ⁢                                    x              ⁡                              (                n                )                                      ⁢                          h              ⁡                              (                                  t                  -                  n                                )                                                                        (                  Eq          .                                          ⁢          1                )            Where x(t) is the new pixel value at the new sampling point t from n=0, x(n) is the original pixel value at index n, and h(t−n) is the value of an interpolation function shifted by t from index n. Furthermore, the coefficients i and j give the number of original pixels involved in reconstructing x(t), i.e. the number of original pixels involved is given by (i+j+1). As a result, based on Eq. 1, the scaling process can be realized by a filter-bank implementation. The number (i+j+1) gives the number of filter taps and h(n) is the tap weighting at n. The sampling process and the theory behind it are well known by those in the art, and accordingly it will not be discussed in detail here.
Ideally, a large buffer memory provides the freedom for a scaling process to exploit filters of any length to achieve the required scaling quality. That is, the size of the buffer memory required is (Wnew*Hold) bytes. However, from FIG. 1 and FIG. 2, the problem is when up-scaling the input picture the memory required increases dramatically. For example, if a picture is to be scaled to be two times larger in each dimension, the buffer memory required becomes (Wnew*Hold)=(2*Wold*Hold). This high memory requirement is not feasible in some applications. In particular, this high memory requirement is not suitable for hardware implementation by integrated circuits (ICs).